package com.samphanie.security.validation.service;

import com.samphanie.security.domain.Captcha;
import com.samphanie.security.validation.enums.ValidateCodeType;
import org.springframework.web.context.request.ServletWebRequest;

/**
 * @author ZSY
 * @email 1451691457@qq.com
 */
public interface ValidateCodeMapper {

    /***
     * @Description: save 保存验证码
     * @param: [request, code, validateCodeType]
     * @return: void
     * @date: 2019/11/24 18:36
     **/
    void save(ServletWebRequest request, Captcha code, ValidateCodeType validateCodeType);

    /***
     * @Description: get 获取验证码
     * @param: [request, validateCodeType]
     * @return: com.zsycms.security.core.validate.code.ValidateCode
     * @date: 2019/11/24 18:37
     **/
    Captcha get(ServletWebRequest request, ValidateCodeType validateCodeType);

    /***
     * @Description: remove 移除验证码
     * @param: [request, validateCodeType]
     * @return: void
     * @date: 2019/11/24 18:39
     **/
    void remove(ServletWebRequest request, ValidateCodeType validateCodeType);

}
